﻿#ifndef INFOTEACHER_H
#define INFOTEACHER_H

#include <QString>
#include <QStringList>
#include <QVector>
#include <QList>
#include <QDebug>
#include "infoperson.h"
#include "managementteacher.h"
#include "infostudent.h"
#include "infocourse.h"
class teacherInfo:public personInfo,public teacherManagement
{
public:
    teacherInfo();

    void setInfo(QString name,QString id,QString password,QString college,QString level,QStringList course);
    //加载相关信息
    void loadInfo();
    //查看相应课程的学生
    bool loadMyStudent(QString selectId);
    //返回选课代码
    QStringList getMyCourse();
    //返回所有信息
    QStringList getAllInfo() const;
    //返回学院
    QString getCollege();
    //返回职称
    QString getLevel();


    //查看我的学生
    virtual void checkMyStudent(QStandardItemModel *model);
    //查看我的课程
    virtual void checkMyCourse(QStandardItemModel *model);
    //修改密码
    virtual bool modifyPassword(QString oldPassword,QString newPassword);
    //查看我的信息
    virtual void checkMyInfo(QStandardItemModel *model,int curRow) const;
    //添加选课编号到我的信息中
    virtual void addCourse(QString id);
    //从我的信息中移除选课编号
    virtual void removeCourse(QString id);
    //提交课程
    virtual void submitCourse(courseInfo &course);
    //以选课编号匹配课程
    virtual courseInfo& matchCourseWithId(const QString courseSelectId,QVector<courseInfo> &course);
    //保存所有信息
    virtual void saveAllInfo();

private:
    QString teaCollege;
    QString teaLevel;
    QString teaPassword;
    QStringList teaCourse;
    QVector<studentInfo> myStudent;
    QVector<studentInfo> allStudent;
    QVector<courseInfo> myCourse;
    QVector<courseInfo> allCourse;
    QList<courseInfo> waitToLoadCourse;

};

#endif // INFOTEACHER_H
